<%@ page import="com.liferay.portal.model.*" %>
<%@ page import="com.liferay.portal.service.*" %>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<portlet:defineObjects />


<portlet:actionURL var="editmarkdURL">
	<portlet:param name="action" value="editmarkd"/>
</portlet:actionURL>
<c:if test="${not empty listSubject}">
<table border="1px" cellpadding="20px">
	<tr>
		<td>Mã môn học</td>
		<td>Tên môn học</td>
		<td>Số tín chỉ</td>
		<td>Điểm</td>
		<% if(renderRequest.getRemoteUser()!= null){ %>
		<c:if test="${role=='Administrator'}">
		<td>Edit</td>
		</c:if>
		<%} %>
		
	</tr>
	<c:forEach items="${listSubject}" var="e">
		<tr>
			<td>${e.idSubject}</td>
			<td>${e.nameSubject}</td>
			<td>${e.numberOfCredit}</td>
			<td>${e.mark}</td>
		<% if(renderRequest.getRemoteUser()!= null){ %>
		<c:if test="${role=='Administrator'}">
		<td>
			<form action="${editmarkdURL}" method="post">
				<input type="hidden" name="<portlet:namespace/>idSubject" value="${e.idSubject}">
				<input type="hidden" name="<portlet:namespace/>idSubjectOpen" value="${e.idSubjectOpen}">
				 <input type="submit" value="Click here">
			</form>
			</td>
		</c:if>
			<%} %>
		</tr>
	</c:forEach>
</table>
</c:if>
<c:if test="${empty listSubject}">
Không tìm thấy kết quả!
</c:if>
